/* KaTeX 数学公式样式 - @import 必须在最开头 */
@import 'katex/dist/katex.min.css';

/* 全局样式 */
* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

#app {
  width: 100%;
  height: 100vh;
}

/* 滚动条样式 */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb {
  background: #c1c1c1;
  border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
  background: #a8a8a8;
}

/* Loading 动画样式 - 公共组件 */
.loading-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
}

.loading-dots {
  display: flex;
  gap: 2px;
}

.loading-dots span {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  animation: loading-bounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
  animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
  animation-delay: -0.16s;
}

.loading-text {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.7);
}

@keyframes loading-bounce {
  0%,
  80%,
  100% {
    transform: scale(0.8);
    opacity: 0.5;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* 自定义 LaTeX 公式样式 */
.katex {
  font-size: 1.1em;
}

.katex-display {
  margin: 1em 0;
  text-align: center;
}

/* 行内公式样式 */
.katex .katex-html {
  white-space: nowrap;
}

/* 数学公式错误提示样式 */
.katex-error {
  color: #cc0000;
  background-color: #ffeaea;
  padding: 2px 4px;
  border-radius: 3px;
  font-family: monospace;
}

/* 答案块样式 */
.answer-box {
  margin: 16px 0;
  border: 1px solid #22c55e;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.1);
  overflow: hidden;
}

.answer-box-header {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  background: rgba(34, 197, 94, 0.2);
  border-bottom: 1px solid rgba(34, 197, 94, 0.3);
  font-size: 12px;
  gap: 6px;
}

.answer-box-icon {
  font-size: 14px;
}

.answer-box-label {
  color: #22c55e;
  font-weight: 600;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.answer-box-content {
  padding: 12px 16px;
  color: #333;
  font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
  font-size: 16px;
  font-weight: 600;
  text-align: center;
  background: rgba(34, 197, 94, 0.05);
  border-radius: 0 0 6px 6px;
}

code::before,
code::after {
  content: none !important;
}
